﻿using System;
using System.Collections.Generic;
using System.Text;
using YJKRevitDimensionText.VerticalAutoDim.GeoModel;

namespace YJKRevitDimensionText.VerticalAutoDim.Group
{
	internal class GeoVerticalDimResult
	{
		public List<IPlanarGeo> ArrayGeo { get; set; }

		public GeoVerticalDimResult()
		{
			this.ArrayGeo = new List<IPlanarGeo>();
		}

		public override int GetHashCode()
		{
			return this.ToString().GetHashCode();
		}

		public override bool Equals(object obj)
		{
			return this.GetHashCode().Equals(obj.GetHashCode());
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("门窗标注结果:");
			foreach (IPlanarGeo planarGeo in this.ArrayGeo)
			{
				stringBuilder.Append(planarGeo.Weight);
				stringBuilder.Append("-");
				stringBuilder.Append(planarGeo.TopElev.ToString("f6"));
				stringBuilder.Append("-");
				stringBuilder.Append(planarGeo.BottomElev.ToString("f6"));
				stringBuilder.Append("-");
			}
			return stringBuilder.ToString();
		}
	}
}
